package com.cloudweb.oa.repository;


import com.cloudweb.oa.entity.Doc;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.List;

@Configuration
public interface DocRepository extends ElasticsearchRepository<Doc, Long> {

    List<Doc> findByTitle(String title);

    List<Doc> findByContent(String content);

    List<Doc> findByTitleOrContent(String title, String content);

    List<Doc> findByTitleOrContent(String title, String content, Pageable pageable);

}
